package com.itheima.web.manager;

import com.itheima.service.db.AnalysisByDayService;
import com.itheima.service.db.UserYear;
import com.itheima.vo.UsersVo;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Component;

import java.util.Date;

@Component
public class AnalysisManager {

    @DubboReference
    AnalysisByDayService analysisByDayService;

    @DubboReference
    UserYear userYear;


    public ResponseEntity users(Date startTime, Date endTime, String type) {
      return ResponseEntity.ok(userYear.users(startTime,endTime,type));

    }

    public ResponseEntity findSummaryVo() {

        return ResponseEntity.ok(analysisByDayService.findSummaryVo());
    }
}
